/**
 * Created with JetBrains WebStorm.
 * User: xdliu
 * Date: 13-6-10
 * Time: 下午9:07
 * To change this template use File | Settings | File Templates.
 */
$(function(){

    $(".key-address").focus(function(){
        var $this = $(this);

        if($this.val() === "输入中心地址"){
            $this.removeClass("color-orange");
            $this.val("")
        }
    });
    $(".key-address").blur(function(){
        var $this = $(this);
        var v =  $.trim($this.val());
        if(v === ""){
            $this.addClass("color-orange");
            $this.val("输入中心地址");
        }
    });
    $(".key-name").focus(function(){
        var $this = $(this);

        if($this.val() === "例：商户名，优惠券名"){
            $this.removeClass("color-999");
            $this.val("")
        }
    });
    $(".key-name").blur(function(){
        var $this = $(this);
        var v =  $.trim($this.val());
        if(v === ""){
            $this.addClass("color-999");
            $this.val("例：商户名，优惠券名")
        }
    });
    
    //ajax 判断是否登录
    

});

//验证规则
var isAlphanumeric = function(data) {
	var reg = /^[A-Za-z0-9]+$/;
	return reg.test(data);
};